import { createI18n } from "vue-i18n";
import en from "./modules/en"
import zh from "./modules/zh-cn"
const i18n = createI18n({
    legacy: false, // Composition API模式需要设为false
    globalInjection: true, // 全局生效: $
    locale: localStorage.getItem("language") || "zh",
    silentTranslationWarn: true,
    missingWarn: false,
    silentFallbackWarn: true,
    fallbackWarn: false,
    messages: {
        zh,
        en
      }
  });
  export default i18n;